/*队列*/
const queue=[]
queue.push(1)
queue.push(2)
queue.push(3)
queue.push(4)
console.log(queue);
while(queue.length){
    let top=queue[0]
    console.log(top);
    queue.shift(top)
    console.log(queue);
}